<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
	<meta charset="<?php bloginfo( 'charset' ); ?>" />
	<meta name="title" content="Rich Files : Net worth, Luxury lifestyle, Cars, Houses, Yachts, Wiki of the rich and the famous"/>
	<meta name="subject" content="Lifestyle"/>
	<meta name="keywords" content="Net worth, luxury lifestyle, luxury homes, private jet, yachts, celebrity autos, collectibles, Brands, Celebrity Pets"/>
	<meta name="description" content="Richfiles, the luxury lifestyle wikipedia of rich people and the information which you always wanted to know"/>
	
    <title><?php
	/*
	 * Print the <title> tag based on what is being viewed.
	 */
	global $page, $paged;

	wp_title( '|', true, 'right' );

	// Add the blog name.
	bloginfo( 'name' );

	// Add the blog description for the home/front page.
	$site_description = get_bloginfo( 'description', 'display' );
	if ( $site_description && ( is_home() || is_front_page() ) )
		echo " | $site_description";

	// Add a page number if necessary:
	if ( $paged >= 2 || $page >= 2 )
		echo ' | ' . sprintf( __( 'Page %s', 'bornrich' ), max( $paged, $page ) );

	?></title>
	
    <link media="screen" href="<?php bloginfo('template_directory'); ?>/style.css" type="text/css" rel="stylesheet" />
	<link media="screen" href="<?php bloginfo('template_directory'); ?>/home.css" type="text/css" rel="stylesheet" />
	<link media="screen" href="<?php bloginfo('template_directory'); ?>/top-header.css" type="text/css" rel="stylesheet" />
	
    <link rel="icon" href="<?php bloginfo('template_directory'); ?>/favicon.ico" type="image/x-icon"/>
	
	<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
	<!--[if lt IE 9]>
	<script src="<?php echo get_template_directory_uri(); ?>/js/html5.js" type="text/javascript"></script>
	<![endif]-->
	<?php
		/* We add some JavaScript to pages with the comment form
		 * to support sites with threaded comments (when in use).
		 */
		if ( is_singular() && get_option( 'thread_comments' ) )
			wp_enqueue_script( 'comment-reply' );

		/* Always have wp_head() just before the closing </head>
		 * tag of your theme, or you will break many plugins, which
		 * generally use this hook to add elements to <head> such
		 * as styles, scripts, and meta tags.
		 */
		wp_head();
	?>


    <!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
    <script src="<?php bloginfo('template_directory'); ?>/js/jquery.min.js"></script>
    <script src="<?php bloginfo('template_directory'); ?>/js/common.js"></script>
	<script src="<?php bloginfo('template_directory'); ?>/js/html5.js"></script>
	
	<!-- for responsive video embeds -->
	<script src="<?php bloginfo('template_directory'); ?>/js/jquery.fitvids.min.js"></script>
	
	 
</head>

<body>

<div class="navbar navbar-inverse">
      <div class="navbar-inner">
        <div class="container">
          <button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </button>
          <a class="brand inline-block" href="/"><i class="icon-richfiles-logo"></i></a>
          <div class="nav-collapse collapse">
          	<?php wp_nav_menu( array( 'menu_class' => 'nav', 'theme_location' => 'top_menu' ) ) ?>
          </div>
        </div>
      </div>
    </div><!-- /.navbar -->
	
	<div class="container">
		<div class="padding15 align-center ipad">
			<a href=""><img src="<?php bloginfo('template_directory'); ?>/images/topBannerAd.jpg"></img></a>
		</div>
		<div class="clear"></div>
		<!--<div class="searchDiv clearfix padding15">
			<form class="fleft">
				<input class="search" type="search"></input><input class="button" type="submit" value="SEARCH"></input>
			</form>
			<div class="clear"></div>
		</div>
		
		--><div class="container-bg relative">
			<div class="inner absolute">
				<div class="inner-bg">
				</div>
			</div>
		</div>
		
		<div class="top-menu ipad more-outer" style="background:#fff;">
			<div class="left-ext"></div>
			
			<div class="row">
				<div class="column">
					<div class="row">

					<?php

						if( is_singular() )
						{
							$group_types = get_post_group_types();
							$i=0;
							foreach( $group_types as $key => $value )
							{
								if( $key == 'Primary' ||  $key == 'Timeline')
								continue;

								if( $value > 0 )
								{
									if($i<9)
									{
								    ?>
								    	<a href="<?php echo $menu_item->url ?>" class="column">
											<span class="indicator-top"></span>
											<span class="row">
												<span class="block column align-center align-middle">
													<i class="icon-menu-<?php echo strtolower($key) ?>"></i>
													<span class="block"><?php echo strtoupper($key) ?></span>
												</span>
											</span>
											<span class="indicator-bottom"></span>
										</a>
									<?php
									$i++;
									}
								}
							}

								?>
								<div class="column searchCol">
									<div class="searchBlock">
										<a href="javascript:;" class="searchBtn">
											<span class="row">
												<span class="column align-center align-middle">
													<span class="caret-down"><i class="icon-search"></i></span>
												</span>
											</span>
										</a>
										<div class="searchInput clearfix hide">
											<form>
												<input type="search" ></input>
											</form>
										</div>
									</div><!-- /.searchBlock -->
								</div><!-- /.searchCol -->
							
								<div class="column moreCol">
									<div class="moreBlock">
										<a href="javascript:;" class="more">
											<span class="row">
												<span class="column align-center align-middle">
													MORE
												</span>
												<span class="column align-center align-middle caret-indicator">
													<span class="caret-down"></span>
												</span>
											</span>
										</a>
										<div class="moreContent clearfix">
										<?php
										$j=0;
										foreach ( $group_types  as $key => $value )
										{
											if($j>=$i)
											{
												?>
													<a href="<?php echo $menu_item->url ?>"><?php echo strtoupper($key) ?></a>
												<?php
											}
										$j++;
										}
										?>
										</div>
									
								</div><!-- /.moreBlock -->
							</div><!-- /.moreCol -->
							<?php
						}
						else
						{


							$menu_name = 'category_menu';

						    if ( ( $locations = get_nav_menu_locations() ) && isset( $locations[ $menu_name ] ) )
						    {
								$menu = wp_get_nav_menu_object( $locations[ $menu_name ] );

								$menu_items = wp_get_nav_menu_items($menu->term_id);
								$i=0;
								foreach ( (array) $menu_items as $key => $menu_item )
								{
									if($i<9)
									{
								    ?>
								    	<a href="<?php echo $menu_item->url ?>" class="column">
											<span class="indicator-top"></span>
											<span class="row">
												<span class="block column align-center align-middle">
													<i class="icon-menu-<?php echo strtolower($menu_item->title) ?>"></i>
													<span class="block"><?php echo strtoupper($menu_item->title) ?></span>
												</span>
											</span>
											<span class="indicator-bottom"></span>
										</a>
									<?php
									$i++;
									}
								}

								?>
								<div class="column searchCol">
									<div class="searchBlock">
										<a href="javascript:;" class="searchBtn">
											<span class="row">
												<span class="column align-center align-middle">
													<span class="caret-down"><i class="icon-search"></i></span>
												</span>
											</span>
										</a>
										<div class="searchInput clearfix hide">
											<form>
												<input type="search" ></input>
											</form>
										</div>
									</div><!-- /.searchBlock -->
								</div><!-- /.searchCol -->
							
								<div class="column moreCol">
									<div class="moreBlock">
										<a href="javascript:;" class="more">
											<span class="row">
												<span class="column align-center align-middle">
													MORE
												</span>
												<span class="column align-center align-middle caret-indicator">
													<span class="caret-down"></span>
												</span>
											</span>
										</a>
										<div class="moreContent clearfix">
										<?php
										$j=0;
										foreach ( (array) $menu_items as $key => $menu_item )
										{
											if($j>=$i)
											{
												?>
													<a href="<?php echo $menu_item->url ?>"><?php echo strtoupper($menu_item->title) ?></a>
												<?php
											}
										$j++;
										}
										?>
										</div>
									</div><!-- /.moreBlock -->
								</div><!-- /.moreCol -->

							   <?php
								
							}
						}
						?>
					</div><!-- /.row -->
				</div><!-- /.column -->
				
				
			</div><!-- /.row -->
			
			<div class="right-ext"></div>
		</div><!-- /.top-menu -->